import App from './App'
import uView from "@/uni_modules/uview-ui"
import requests from "@/utils/requests.js"
import store from "@/store/index.js"
import Config from "./common/config.js"

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
Vue.use(uView)
App.mpType = 'app'
Vue.prototype.$store = store;
Vue.mixin({
  data(){
    return {
      globalA:'1'
    }
  },
  computed:{
    globalIcon(){
	  let datas = this.$store.getters.getIcons;
	  let username = this.$store.getters.userName;
	  datas['isdouyin'] = this.$store.getters.getsysteminfo.uniPlatform == "mp-toutiao"
	  datas['headPortrait'] = Config.static_url + 'ins_img/'+username+'HeadPortrait.jpg'
      return datas
    }
  }
})
const app = new Vue({
	store,
    ...App
})
requests(app)
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif